-
Notifications
You must be signed in to change notification settings - Fork 417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove deprecations slated for 24.3 #5203
Conversation
6c590be
to
1b8aec6
Compare
1b8aec6
to
c1a2bc3
Compare
# NOTE: The function has to retain the "get_install_actions" name for now since | ||
# conda_libmamba_solver.solver.LibMambaSolver._called_from_conda_build | ||
# checks for this name in the call stack explicitly. | ||
def get_install_actions( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -30,7 +30,7 @@ requirements: | |||
run: | |||
- beautifulsoup4 | |||
- chardet | |||
- conda >=22.11.0 | |||
- conda >=23.5.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NICE!
@deprecated( | ||
"24.1.0", "24.5.0", addendum="Use `conda_index._apply_instructions` instead." | ||
) | ||
def _apply_instructions(subdir, repodata, instructions): | ||
repodata.setdefault("removed", []) | ||
utils.merge_or_update_dict( | ||
repodata.get("packages", {}), | ||
instructions.get("packages", {}), | ||
merge=False, | ||
add_missing_keys=False, | ||
) | ||
# we could have totally separate instructions for .conda than .tar.bz2, but it's easier if we assume | ||
# that a similarly-named .tar.bz2 file is the same content as .conda, and shares fixes | ||
new_pkg_fixes = { | ||
k.replace(CONDA_PACKAGE_EXTENSION_V1, CONDA_PACKAGE_EXTENSION_V2): v | ||
for k, v in instructions.get("packages", {}).items() | ||
} | ||
|
||
utils.merge_or_update_dict( | ||
repodata.get("packages.conda", {}), | ||
new_pkg_fixes, | ||
merge=False, | ||
add_missing_keys=False, | ||
) | ||
utils.merge_or_update_dict( | ||
repodata.get("packages.conda", {}), | ||
instructions.get("packages.conda", {}), | ||
merge=False, | ||
add_missing_keys=False, | ||
) | ||
|
||
for fn in instructions.get("revoke", ()): | ||
for key in ("packages", "packages.conda"): | ||
if fn.endswith(CONDA_PACKAGE_EXTENSION_V1) and key == "packages.conda": | ||
fn = fn.replace(CONDA_PACKAGE_EXTENSION_V1, CONDA_PACKAGE_EXTENSION_V2) | ||
if fn in repodata[key]: | ||
repodata[key][fn]["revoked"] = True | ||
repodata[key][fn]["depends"].append("package_has_been_revoked") | ||
|
||
for fn in instructions.get("remove", ()): | ||
for key in ("packages", "packages.conda"): | ||
if fn.endswith(CONDA_PACKAGE_EXTENSION_V1) and key == "packages.conda": | ||
fn = fn.replace(CONDA_PACKAGE_EXTENSION_V1, CONDA_PACKAGE_EXTENSION_V2) | ||
popped = repodata[key].pop(fn, None) | ||
if popped: | ||
repodata["removed"].append(fn) | ||
repodata["removed"].sort() | ||
|
||
return repodata |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is slated for removal in 24.5
at the earliest.
We have downstream code to adjust beforehand.
See #5152 (comment) .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressing this in gh-5226 .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops!
Description
Changes:
conda.core.subdir_data.SubdirData._process_raw_repodata
)conda_build.index
(part of switch to conda-index)conda_build.environ.get_install_actions
in favor ofconda_build.environ.get_package_records
(part of deprecatingconda.models.dist.Dist
)conda.exports
andconda_build.conda_interface
Checklist - did you ...
news
directory (using the template) for the next release's release notes?Add / update outdated documentation?